package com.frinder.robot.strategy.task.convert;

import com.frinder.base.strategy.BaseStrategy;
import com.frinder.robot.handler.task.RobotTask;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Map;

/**
 * @ClassName ConvertToRobotTaskBaseStrategy
 * @Description 外部任务转化为机器人任务策略基类
 * @Author frinder
 * @Date 2019/10/18 10:39
 * @Verion 1.0
 */
@Slf4j
public class ConvertToRobotTaskBaseStrategy extends BaseStrategy<ConvertToRobotTaskPayload> {

    @Autowired
    private Map<String, RobotTask> RobotTasks;

    /**
     * 添加任务
     *
     * @param task
     */
    protected void add(RobotTask task) {
        RobotTasks.put(task.getTaskId(), task);
    }

}
